
add_executable(os_example
    # 在这里添加测试源文件
    os_thread_example.cpp
)
# 设置可执行文件输出路径为build目录下的bin/test
set_target_properties(os_example PROPERTIES
    RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/example
)

# 链接库
target_link_libraries(os_example PRIVATE 
    OmniCpp
    pthread
)

# 设置包含目录
target_include_directories(os_example PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_CURRENT_SOURCE_DIR}/..
)
# 确保 gtest 在 os_test 之前构建
add_dependencies(os_example OmniCpp)